<?php

namespace easydis\APSBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Salarie
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="easydis\APSBundle\EntityRepository\SalarieRepository")
 */
class Salarie
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;
    
    /**
     * @var string
     *
     * @ORM\Column(type="string", length=30, unique=true)
     */
    private $matricule;

    /**
     * @var string
     *
     * @ORM\Column(name="prenom", type="string")
     */
    private $prenom;
    
    /**
     * @var string
     *
     * @ORM\Column(name="prenom2", type="string", nullable=true)
     */
    private $prenom2;
    
    /**
     * @var string
     *
     * @ORM\Column(name="prenom3", type="string", nullable=true)
     */
    private $prenom3;
    
    /**
     * @var string
     *
     * @ORM\Column(name="nom", type="string")
     */
    private $nom;

    /**
     * @ORM\ManyToOne(targetEntity="easydis\APSBundle\Entity\Section")
     * @ORM\JoinColumn(nullable=false)
     */
    private $section;
    
    /**
     * @ORM\ManyToOne(targetEntity="easydis\APSBundle\Entity\Contrat", cascade={"persist", "remove"}))
     * @ORM\JoinColumn(nullable=false)
     */
    private $contrat;
    
    /**
     * @var boolean
     *
     * @ORM\Column(name="visibilite", type="boolean", length=2)
     */
    private $visibilite = true;
    
    public function __construct() {
        
    }   

    public function set_all($matricule, $nom, $prenom, $section, $contrat) {
        $this->matricule = $matricule;
        $this->nom = $nom;
        $this->prenom = $prenom;
        $this->section = $section;
        $this->contrat = $contrat;
    }
    
    /**
     * Set contrat
     *
     * @param easydis\APSBundle\Entity\GroupeService $groupe_service
     */
    public function setContrat(\easydis\APSBundle\Entity\Contrat $contrat)
    {
            $this->contrat = $contrat;
    }

    /**
     * Get contrat
     *
     * @return easydis\APSBundle\Entity\Contrat
     */
    public function getContrat()
    {
            return $this->contrat;
    }
    
    /**
     * Set section
     *
     * @param easydis\APSBundle\Entity\Section $section
     */
    public function setSection(\easydis\APSBundle\Entity\Section $section)
    {
            $this->section = $section;
    }

    /**
     * Get section
     *
     * @return easydis\APSBundle\Entity\Section 
     */
    public function getSection()
    {
            return $this->section;
    }
    
    /**
     * Set matricule
     *
     * @param string $matricule
     * @return salarie
     */
    public function setMatricule($matricule)
    {
        $this->matricule = $matricule;
    
        return $this;
    }
    
    /**
     * Get matricule
     *
     * @return string 
     */
    public function getMatricule()
    {
        return $this->matricule;
    }
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }
    
    /**
     * Set prenom
     *
     * @param string $prenom
     * @return salarie
     */
    public function setPrenom($prenom)
    {
        $this->prenom = $prenom;
    
        return $this;
    }

    /**
     * Get prenom
     *
     * @return string 
     */
    public function getPrenom()
    {
        return $this->prenom;
    }
    
    /**
     * Set prenom2
     *
     * @param string $prenom2
     * @return salarie
     */
    public function setPrenom2($prenom2)
    {
        $this->prenom2 = $prenom2;
    
        return $this;
    }

    /**
     * Get prenom2
     *
     * @return string 
     */
    public function getPrenom2()
    {
        return $this->prenom2;
    }
    
    /**
     * Set prenom3
     *
     * @param string $prenom3
     * @return salarie
     */
    public function setPrenom3($prenom3)
    {
        $this->prenom3 = $prenom3;
    
        return $this;
    }

    /**
     * Get prenom3
     *
     * @return string 
     */
    public function getPrenom3()
    {
        return $this->prenom3;
    }
    
    /**
     * Set nom
     *
     * @param string $Nom
     * @return salarie
     */
    public function setNom($Nom)
    {
        $this->nom = $Nom;
    
        return $this;
    }

    /**
     * Get nom
     *
     * @return string 
     */
    public function getNom()
    {
        return $this->nom;
    }
    
    /**
     * Get visibilite
     *
     * @return boolean 
     */
    public function getVisibilite()
    {
        return $this->visibilite;
    }
    
    /**
     * Set visibilite
     *
     * @param boolean $visibilite
     */
    public function setVisibilite($visibilite)
    {
        $this->visibilite = $visibilite;
    }
}
